//登录接口需要携带参数ts类型

export interface loginForm {
  username: string
  password: string
}

interface dataType {
  token?: string,
  message?:string
}
//登录接口返回数据类型
export interface loginResponseData {
  code: number
  data: dataType
}

interface userInfo {
  userId?: number
  avatar?: string
  id?: string
  username: string
  password: string
  token?: string
}

interface user {
  checkUser: userInfo
}
//定义服务器返回用户信息相关的数据类型
export interface ResponseData {
  code: number,
  // data: user,
}
export interface userResponseData extends ResponseData{
  data:{
    routes:string[],
    buttons:string[],
    name:string,
  }
}
export interface CategoryObj{
  id:number|string,
  name:string,
  categoryId?:number
}
export interface CategoryResponseData extends ResponseData{
  data:CategoryObj[]
}